package service

import (
	"context"
	"{{cookiecutter.project_name}}/internal/biz"

	pb "{{cookiecutter.project_name}}/api/v1"
)

type {{cookiecutter.project_name | capitalize }}Service struct {
	pb.Unimplemented{{cookiecutter.project_name | capitalize }}Server
	biz *biz.{{cookiecutter.project_name | capitalize }}Biz
}

func New{{cookiecutter.project_name | capitalize }}Service(biz *biz.{{cookiecutter.project_name | capitalize }}Biz) *{{cookiecutter.project_name | capitalize }}Service {
	return &{{cookiecutter.project_name | capitalize }}Service{
		biz: biz,
	}
}

func (s *{{cookiecutter.project_name | capitalize }}Service) Index(ctx context.Context, req *pb.IndexRequest) (*pb.IndexReply, error) {
	// 这里调用biz的处理逻辑
	// s.biz.Index()
	return &pb.IndexReply{}, nil
}
